package com.junfeng.pet2048.util;

import java.util.UUID;

public class MyUUIDUtils {
	
	public static String getUUID(){
		//fajkfjlk-fkldsjalk-fskaj
		String uuid = UUID.randomUUID().toString();
		//将 '-' 去掉
		uuid = uuid.replaceAll("-", "");
		//fajkfjlkfkldsjalkfskaj
		return uuid;
	}

	public static String getUUID(String uname){
		//fajkfjlk-fkldsjalk-fskaj
		String uuid = UUID.randomUUID().toString();
		//将 '-' 去掉
		uuid = uuid.replaceAll("-", "");
		//fajkfjlkfkldsjalkfskaj
		uuid = uuid + "[" + uname +"]";
		return uuid;
	}
	
}